package com.james.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
  * @ClassName: Log
  * @Author: JamesWang
  * @Date: 2021/4/22 15:19
  * @Description:  
  * @Version:1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "sy_log")
public class Log implements Serializable {
    /**
     * 日志id
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Integer logId;

    /**
     * 用户名称
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 操作描述
     */
    @TableField(value = "`operation`")
    private String operation;

    /**
     * 方法名称
     */
    @TableField(value = "`method`")
    private String method;

    /**
     * 入参列表
     */
    @TableField(value = "params")
    private String params;

    /**
     * 执行时长(毫秒)
     */
    @TableField(value = "`time`")
    private Long time;

    /**
     * ip地址
     */
    @TableField(value = "ip")
    private String ip;

    /**
     * 操作时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_LOG_ID = "log_id";

    public static final String COL_USER_NAME = "user_name";

    public static final String COL_OPERATION = "operation";

    public static final String COL_METHOD = "method";

    public static final String COL_PARAMS = "params";

    public static final String COL_TIME = "time";

    public static final String COL_IP = "ip";

    public static final String COL_CREATE_TIME = "create_time";
}